package wangzp.Test;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class WangzpActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        final EditText etName = (EditText)this.findViewById(R.id.txtName);
        Button btnOK =(Button) this.findViewById(R.id.btnOK);
        btnOK.setOnClickListener(new OnClickListener(){
        		public void onClick(View v) {
	        	   String info = etName.getText().toString();
	        	   Bundle bundle = new Bundle();
	
	        	   bundle.putString("name", info);
	        	   Intent intent=new Intent(WangzpActivity.this,BundleDemo.class);
	        	   intent.putExtras(bundle);
	        	   startActivity(intent);
	        	   finish();
        	   }
        });
    }
    
}